﻿@{
    ViewBag.Title = "ListMember";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@section scripts
{
    <script type="text/javascript" src="~/Scripts/App/Admin/member_resetpass.js"></script>
}


<!-- Page's header -->
<div class="content-header">
    <div class="header-section">
        <h1>
            <i class="gi gi-certificate"></i>Quản Lý Thành Viên<br>
            <small>Khôi Phục Mật Khẩu</small>
        </h1>
    </div>
</div>
<ul class="breadcrumb breadcrumb-top">
    <li><a href="../Admin/index"><i class="fa fa-home"></i></a></li>
    <li><a href="../Admin/ListMember">Thành Viên</a></li>
    <li><a href="../Admin/ResetPasswordMember">Khôi Phục Mật Khẩu</a></li>
</ul>


<!-- List Member -->
<div class="tab-content">
    <div id="listmem-div" class="block block-alt-noborder tab-pane fade in active animation-slideRight">
        <div class="container-fluid">
            <div class="row">
                <div class="pull-right col-md-2" style="margin-left: 10px"><a href="AddMember" class="btn btn-block btn-success">Tạo Mới</a></div>
                <div class="dataTables_filter" id="example-datatable_filter">
                    <div class="input-group">
                        <input type="text" data-bind="instantValue: SearchString, event: { keypress: $root.EnterSendMsg }" aria-controls="example-datatable" class="form-control" placeholder="Tìm Kiếm">
                        <span class="input-group-addon" style="cursor: pointer" data-bind="click: $root.SendMsg">
                            <i class="fa fa-search"></i>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        <br />

        <div class="table-responsive">
            <table class="table table-vcenter table-striped table-hover">
                <thead>
                    <tr class="text-center">
                        <th class="text-center">#</th>
                        <th>Tài Khoản</th>
                        <th style="width: 250px;">Họ Tên</th>
                        <th class="text-center" style="width: 150px;">Giới Tính</th>
                        <th>Email</th>
                        <th class="text-center" style="width: 150px;">CMND</th>
                        <th class="text-center" style="width: 150px;">Cấp Độ</th>
                        <th class="text-center" style="width: 150px;">Điểm Thưởng</th>
                        <th class="text-center" style="width: 200px;">Thao Tác</th>
                    </tr>
                </thead>
                <tbody data-bind="foreach: Members">
                    <tr>
                        <td class="text-center" data-bind="text: MemId"></td>
                        <td data-bind="text: UserName"></td>
                        <td>
                            <label data-bind="text: FirstName"></label>
                            <label data-bind="text: LastName"></label>
                        </td>
                        <td class="text-center" data-bind="text: Gender=='Male'?'Nam':'Nữ'"></td>
                        <td data-bind="text: Email"></td>
                        <td class="text-center" data-bind="text: CMND"></td>
                        <td class="text-center" data-bind="text: Level"></td>
                        <td class="text-center" data-bind="text: Point"></td>
                        <td class="text-center">
                            <div class="btn-group btn-group-xs">
                                <a class="btn btn-xs btn-default" data-bind="click: $root.doResetPass">
                                    <i class="fa fa-pencil"></i>Khôi Phục Mật Khẩu
                                </a>
                            </div>
                        </td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan="5">
                            <div class="col-md-4 pull-right">
                                <ul class="pager">
                                    <li class="prev" data-bind="css: { disabled: IsPrevious() === false }">
                                        <a href="#" data-bind="    click: $root.doPrevious">← Trang Trước</a>
                                    </li>
                                    <li class="next" data-bind="css: { disabled: IsNext() === false }">
                                        <a href="#" data-bind="    click: $root.doNext">Trang Sau →</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>
</div>